<template>
    <div class="main-container">
        <el-form label-width="64px">
            <el-form-item label="用户名">
                <el-input v-model="form.userName"></el-input>
            </el-form-item>
            <el-form-item label="新密码">
                <el-input v-model="form.password"></el-input>
            </el-form-item>
            <el-form-item>
                <el-button size="large" type="primary" style="width:100%;" @click.prevent="handleForget">
                    <span>修 改</span>
                </el-button>
                <div style="float: right;">
                    <router-link class="link-type" :to="'/login'">使用已有账户登录</router-link>
                </div>
            </el-form-item>
        </el-form>
    </div>
</template>

<script setup>
import { forgetPassword } from '@/api/system/user'
import { ElMessage } from 'element-plus'

const form = ref({
    userName: '',
    password: ''
})

function handleForget() {
    forgetPassword(form.value).then(res => {
    })
}

</script>

<style lang="scss" scoped>
.main-container {

    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
</style>